<?php
class Bootstrap extends Zend_Application_Bootstrap_Bootstrap{
	protected function _initAutoload(){
		$autoloader = new Zend_Application_Module_Autoloader(array(
				'namespace' => '',
				'basePath' => dirname(__FILE__),
		));
		return $autoloader;
	}
	protected function _initDatabase(){
		$db = $this->getPluginResource('db')->getDbAdapter();
		Zend_Registry::set('db', $db);
		$select = $db->query("SET NAMES utf8");
	}
	protected function _initPlugins(){
		$front = Zend_Controller_Front::getInstance();
		$front->registerPlugin(new Zgome_Plugins_LayoutSelector());
	}
// 	protected function _initRouters(){
// 		$frontController = Zend_Controller_Front::getInstance();
		
// 		$router = $frontController->getRouter();
// // 		$router->addRoute( 'mylovelyroute',
// // 				new Zend_Controller_Router_Route_Static( 'for-fun-link',
// // 						array( 'controller' => 'test', 'action' => 'about' )
// // 				)
// // 		);
// 		$router->addRoute( 'myotherroute',
// 				new Zend_Controller_Router_Route_Static( 'game/:name',
// 						array( 'controller' => 'game', 'action' => 'detail' )
// 				)
// 		);
// // 		$router->addRoute( 'justonemore',
// // 				new Zend_Controller_Router_Route_Static( 'another/longer/path',
// // 						array( 'controller' => 'mycontroller',
// // 								'action' => 'myaction',
// // 								'someparameter' => 'foo'
// // 						)
// // 				)
// // 		);
		
// 		$frontController->dispatch();
// 	}
}
?>